#!user/bin/env python3
# -- coding: utf-8 --
import time

from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.edge.service import Service

driver = webdriver.Edge(service=Service(r'C:\Users\Administrator\PycharmProjects\web_crawler\MicrosoftWebDriver.exe'))
driver.get('https://movie.douban.com/')
driver.find_element(By.XPATH,
                    '//*[@src="https://img2.doubanio.com/view/photo/s_ratio_poster/public/p2870257091.webp"]').click()
driver.back()
time.sleep(3)
driver.forward()
time.sleep(3)
driver.quit()
